package mmc.action.skill;

import java.util.Random;

import mmc.MovableEngineObject;
import mmc.action.TargetException;
import mmc.server.RemoteClient;

public class Heal extends Skill {	
	
	public Heal(){
		super("Heal", "mmc/resource/data/heal.png",  0);
		this.casttime = 1;
	}
	
	@Override
	public void endCast(RemoteClient client){
		int heal = Math.abs(new Random().nextInt()%15)+10;
		MovableEngineObject tar;
		try {
			tar = (MovableEngineObject) resolveTarget(client, targetId);
			tar.heal(heal);
		} catch (TargetException e) {
			e.printStackTrace();
		}
	}
}
